﻿using System.Collections.Generic;
using System.Text;
using UnityEngine;

namespace TC
{
    [Menu("Function/Print")]
    public class Print : FunctionNode
    {
        public string str = "print";
        
        public List<ValueInput<object>> valueIns;
        
        public override void Execute(Dispatcher chain)
        {
            base.Execute(chain);

            StringBuilder sb = new StringBuilder();
            sb.Append(str);
            sb.Append(": ");

            foreach(var i in valueIns)
            {
                sb.Append(i.name);
                sb.Append("=");
                sb.Append(i.Value);
            }

            Debug.Log(sb.ToString());

            chain.Call(flowOut);
        }
    }
}
